package net.llz.flyweight;

public class Main {
    public static void main(String[] args) {

        WebSiteFactory factory = new WebSiteFactory();

        CloudWebSite companySite1 =  factory.getWebSiteByCategory("企业官网");
        companySite1.run(new Company("小滴课堂"));

        CloudWebSite companySite2 =  factory.getWebSiteByCategory("企业官网");
        companySite2.run(new Company("旭瑶课堂"));

        CloudWebSite byteDanceSite =  factory.getWebSiteByCategory("信息流");
        byteDanceSite.run(new Company("字节跳动"));

        CloudWebSite byteDanceSite1 =  factory.getWebSiteByCategory("信息流");
        byteDanceSite1.run(new Company("字节跳动"));

        CloudWebSite ucNews =  factory.getWebSiteByCategory("信息流");
        ucNews.run(new Company("优视科技"));

        System.out.println("网站分类总数:" +factory.getWebsiteCategorySize());
    }
}
